import {
	request
} from './request'
import {
	requestNews
} from './requestNews'

import qs from 'qs'





// 添加 修改 文章 视频
export function addTopic(obj) {
	return request({
		url: 'topic/addTopic',
		method: 'post',
		data: obj,
		headers: {
			'content-type': 'multipart/form-data'
		},
	})
}


//  获取 文章 视频
export function getTopicPage(obj) {
	return request({
		url: 'topic/getTopicPage',
		method: 'post',
		data: qs.stringify(obj)

	})
}
//  启用 禁用 文章 视频
export function updateTopic(obj) {
	return request({
		url: 'topic/updateTopic',
		method: 'post',
		data: qs.stringify(obj)

	})
}

//删除
export function deleteTopic(obj) {
	return request({
		url: 'topic/delTopic',
		method: 'post',
		data: qs.stringify(obj)
	})
}
//  评论置顶
export function zhidingComment(obj) {
	return request({
		url: 'topic/zhidingComment',
		method: 'post',
		data: qs.stringify(obj)
	})
}
// 删除 评论
export function delComment(obj) {
	return request({
		url: 'topic/delComment',
		method: 'post',
		data: qs.stringify(obj)
	})
}
// 获取 评论
export function getTopicComment(obj) {
	return request({
		url: 'topic/getTopicComment',
		method: 'post',
		data: qs.stringify(obj)
	})
}


// 视频 文章 回复导表 
export function importComment(obj) {
	return request({
		url: 'topic/importComment',
		headers: {
			'content-type': 'multipart/form-data'
		},
		method: 'post',
		data: obj
	})
}

























//删除视频
export function deleteVideoResponse(obj) {
	return requestNews({
		url: 'backVitality/deleteVideoComment',
		method: 'post',
		data: qs.stringify(obj)
	})
}

// 视频导表
export function importVideoComment(obj) {
	return requestNews({
		url: 'backVitality/importVideoComment',
		headers: {
			'content-type': 'multipart/form-data'
		},
		method: 'post',
		data: obj
	})
}

// 获取视频
export function getVideo(obj) {
	return requestNews({
		url: 'backVitality/getVideoComment',
		method: 'post',
		data: qs.stringify(obj)
	})
}




//分页获取文章分类
export function getTopicTypeByPage(obj) {
	return request({
		url: 'forum/getTopicTypeByPage',
		method: 'post',
		data: qs.stringify(obj)
	})
}

//添加&修改文章分类
export function addOrEditTopicType(obj) {
	return request({
		url: 'forum/addTopicType',
		method: 'post',
		data: qs.stringify(obj)
	})
}
//删除文章分类
export function drupTopicType(obj) {
	return request({
		url: 'forum/delTopicType',
		method: 'post',
		data: qs.stringify(obj)
	})
}

//分页获取文章回复
export function getCommentUsersByPage(obj) {
	return request({
		url: 'forum/getTopicCommentBack',
		method: 'post',
		data: qs.stringify(obj)
	})
}

//分页获取论坛回复
export function getCommentForumByPage(obj) {
	return request({
		url: 'forum/getForumCommentBack',
		method: 'post',
		data: qs.stringify(obj)
	})
}
//删除文章回复
export function deleteTopicResponse(obj) {
	return request({
		url: 'forum/delTopic',
		method: 'post',
		data: qs.stringify(obj)
	})
}
//文章审核通过
export function updateTopicComment(obj) {
	return request({
		url: 'forum/applyTopicComments',
		method: 'post',
		data: qs.stringify(obj)
	})

}
//论坛审核通过
export function updateForumComment(obj) {
	return request({
		url: 'forum/applyComments',
		method: 'post',
		data: qs.stringify(obj)
	})
}



//导表
export function importExcelAnswer(obj) {
	return request({
		url: 'product/importAnswer',
		headers: {
			'content-type': 'multipart/form-data'
		},
		method: 'post',
		data: obj
	})
}

//获取文章列表
export function listTopic(obj) {
	return requestNews({
		url: 'community/getTopics',
		method: 'post',
		data: qs.stringify(obj)
	})
}

// 门店获取文章列表
export function shopListTopic(obj) {
	return request({
		url: 'community/getShopTopics',
		method: 'post',
		data: qs.stringify(obj)
	})
}



//修改文章
export function getTopicById(obj) {
	return request({
		url: 'forum/getTopicById',
		method: 'post',
		data: qs.stringify(obj)
	})
}

// 文章置顶
export function updateTopicZhiding(obj) {
	return request({
		url: 'forum/zhidingTopic',
		method: 'post',
		data: qs.stringify(obj)
	})
}




export function getAllShop(obj) {
	return requestNews({
		url: 'community/getAllShop',
		method: 'post',
		data: qs.stringify(obj)
	})
}

export function doctorList(obj) {
	return requestNews({
		url: 'return/getDoctor',
		method: 'post',
		data: qs.stringify(obj)
	})
}
//总店 审核门店 文章
export function updateShopTopics(obj) {
	return requestNews({
		url: 'community/updateShopTopics',
		method: 'post',
		data: qs.stringify(obj)
	})
}

// 总事业部获取文章
export function getAllShopTopics(obj) {
	return requestNews({
		url: 'community/shopTopics',
		method: 'post',
		data: qs.stringify(obj)
	})
}






//  添加视频文章 标签
export function addTag(obj) {
	return request({
		url: 'TopicOrVideoTag/addTag',
		method: 'post',
		data: qs.stringify(obj)
	})
}
//  获取 视频文章标签
export function getTagList(obj) {
	return request({
		url: 'TopicOrVideoTag/getTagList',
		method: 'post',
		data: qs.stringify(obj)
	})
}
//  删除 视频文章标签
export function delTag(obj) {
	return request({
		url: 'TopicOrVideoTag/delTag',
		method: 'post',
		data: qs.stringify(obj)
	})
}

